package com.ark.cloud.dataservices.auth.controller;

import com.ark.cloud.dataservices.common.exception.AuthErrorType;
import com.ark.cloud.dataservices.common.web.entity.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Copyright(c): 2021 Cloud-Ark Inc.
 * Author(s): Ma Wei (mawei@cloud-ark.com)
 */
@RestController
public class ExceptionController {
    /**
     * 重新抛出异常
     */
    @RequestMapping("/permissionDeniedException")
    public Result expiredJwtException(HttpServletRequest request) {
        return Result.fail(AuthErrorType.INSUFFICIENT_SCOPE);
    }
}
